/**
 * @Author: Boring
 * @Description:
 * @File:  statefulset
 * @Date: 2024-03-02 14:50
 */

package statefulset

import (
	"github.com/gin-gonic/gin"
	"oam-manage-backend/controllers/statefulset"
)

func create(statefulsetGroup *gin.RouterGroup) {
	statefulsetGroup.POST("/create", statefulset.Create)
}

func update(statefulsetGroup *gin.RouterGroup) {
	statefulsetGroup.PUT("/update", statefulset.Update)
}

func delete(statefulsetGroup *gin.RouterGroup) {
	statefulsetGroup.DELETE("/delete", statefulset.Delete)
}

func deleteList(statefulsetGroup *gin.RouterGroup) {
	statefulsetGroup.POST("/deleteList", statefulset.DeleteList)
}

func get(statefulsetGroup *gin.RouterGroup) {
	statefulsetGroup.GET("/get", statefulset.Get)
}

func list(statefulsetGroup *gin.RouterGroup) {
	statefulsetGroup.GET("/list", statefulset.List)
}

func RegisterSubRouter(g *gin.RouterGroup) {
	statefulsetGroup := g.Group("/statefulset")
	create(statefulsetGroup)
	update(statefulsetGroup)
	delete(statefulsetGroup)
	deleteList(statefulsetGroup)
	get(statefulsetGroup)
	list(statefulsetGroup)
}
